home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-04-06 | 5.9 KB | 128 lines | [TEXT/KAHL] |
- Scroll Limit CDEV (Version 1.0)
- ===============================
- Written by Ken McLeod
- Copyright ⌐1989, Blue Cloud Software; All Rights Reserved
-
- You may use and distribute Scroll Limit at no charge, but you may not
- sell it, or collect money for its distribution (normal disk duplication
- fees excepted). Anyone wishing to distribute Scroll Limit along with any
- commercial or shareware software package may do so only with my express
- written consent.
-
-
- Purpose & Description
- ---------------------
- The enhanced processing power available in the Macintosh IIx and
- SE/30, as well as in various third-party "accelerator" boards for the Mac
- Plus, SE, and II, tends to dramatically increase the speed of scroll bars
- and other dynamic controls. Ironically, this "speeded-up action" actually
- becomes a disadvantage when small, precise scrolling increments are
- desired. Apple provides for user control of the key-repeat rate with the
- "Keyboard" Control Panel Device, but no method has been available for
- regulating the action rate of controls.
-
- Scroll Limit provides this "missing control" with a Control Panel
- Device (CDEV) that allows you to select the rate and threshold delay
- of your scroll bars.
-
- Note that while Scroll Limit was designed for faster machines
- (especially those running at speeds greater than 16 MHz), it will work
- on any Macintosh model except the 128K and unenhanced 512K.
-
-
- Installing Scroll Limit
- -----------------------
- Place the Scroll Limit file in your System Folder and reboot. That's
- all there is to it. You must be running System 4.1 or greater to use
- Scroll Limit (but you probably guessed as much).
-
-
- Using Scroll Limit
- ------------------
- Scroll Limit automatically installs itself into memory at startup.
- (In technical jargon, that's because it's an "INIT/cdev combo.") If you
- don't want Scroll Limit to load for some reason, just hold down either
- the mouse button or the Shift key while your Mac is starting up.
-
- You can configure Scroll Limit by bringing up the Control Panel desk
- accessory from the Apple menu, and selecting the Scroll Limit icon.
- There are two separate settings: "repeat rate," and "delay before repeat."
- The "delay before repeat" is the amount of time that should pass AFTER the
- first click and subsequent scroll action, but BEFORE "continuous scrolling"
- begins. The "repeat rate" is the minimum amount of time each repeated
- scrolling action should take. These settings work in much the same
- fashion as the "Keyboard" or "Mouse" repeat settings.
-
- A "test" scroll bar is provided, so you can experiment with the results
- of different settings. There is also a "Startup Icon" checkbox; if it's
- checked, the Scroll Limit icon will appear on your screen at startup to let
- you know it's been installed. Finally, the "question mark (?)" button
- displays much of the same information that you're already reading here.
-
-
- Technical Info
- --------------
- Well-written programs call _TrackControl when a click in a scroll bar
- (or other dynamic control) is detected, generally passing it a pointer
- to an "action procedure" that is to be executed once per "increment."
- The _TrackControl routine enters a loop in which the action procedure
- is called, then _WaitMouseUp is called to determine if the mouse button
- is still down. If it is, the action procedure is called again, and so on
- until _WaitMouseUp returns false.
-
- Scroll Limit works by patching the _WaitMouseUp trap. Since the
- time taken for one "scrolling increment" is divided between the action
- procedure and _WaitMouseUp, we can measure the time (in ticks) between
- successive calls to _WaitMouseUp to determine the rate of a single
- increment. If this time is less than a constant X, the patch simply loops
- until the total time taken is X or the mouse button is released; if the
- time already spent is greater than X, the patch does nothing. A special
- case occurs the first time that _WaitMouseUp is called after the scroll
- bar is clicked: the "threshold" before subsequent repeats. In this
- instance, a separate value Y (usually longer than X) is used to time the
- increment. This method has the advantage of not further slowing down
- already "scrolling-intensive" applications, and it allows a constant
- maximum "scroll speed" to be maintained across different applications
- and machines.
-
- The tick constants, X and Y, are set by the user in the Control Panel.
- Each radio button represents a different constant rate (in ticks), ranging
- from 0 (the "None" setting) to a maximum value, or "longest" time interval.
- These constants are stored in a STR# resource, and can be edited with
- ResEdit, if desired, to provide a different range of settings (although I
- request that you do not distribute any copies that you modify in this way!)
-
- The strings have the following format:
-
- 0,n1,n2,n3,n4,n5,n6
-
- where the first number is always 0, followed by six numbers (n1-n6)
- ranging in value from low to high. Each number is separated by a comma.
-
- Further implementation details are left as an exercise to the reader. :-)
-
-
- Future Enhancements
- -------------------
- In testing Scroll Limit, it became obvious that the "ideal" rate of
- speed for scroll bars differs with their application. In the most common
- usage -- scrolling lines of text in a word processor or text editor -- it
- seems most desireable to have ONLY a "threshold delay", with no subsequent
- repeat delays. However, when trying to scroll to a particular file in the
- standard file dialog on a fast machine, the need for a somewhat slower
- repeat speed is evident. A future version of ScrollLimit may incorporate
- the ability to select alternate settings for different contexts.
-
-
- Comments, Suggestions, Etc.
- ---------------------------
- If you have bug reports or suggestions, I can be contacted via
- electronic mail at:
-
- {zardoz felix}!dhw68k!thecloud (UUCP)
- thecloud@dhw68k.cts.com (InterNet)
- or
- The AppleBus BBS (818) 919-5459 (box #8, or send mail to sysop)
-
- Sorry, no high-priced CompuServe or AppleLink addresses (yet).
-